<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<title></title> 
<%@include file="../../commons/_meta.jsp"%>
<base href="${ctx}">  
<meta charset="utf-8"> 
<link rel="stylesheet" href="${ctx}assets/plugins/pure/pure-min.css" media="all" />
<script type="text/javascript">
debugs("${ctx} --- auth-view.jsp"); 
jQuery(document).ready(function() { 
	$("#back_btn").click(function() {
		//$(form).ajaxSubmit();
		var index = parent.layer.getFrameIndex(window.name);
		debugs("parentpage listForm");
		parent.listFormPageSearch(1);
		debugs("parentpage listForm Done");
		parent.layer.close(index);
	});
}); 
</script> 
</head>
<body >
<form class="pure-form pure-form-aligned" id="forms" method="post" action="${ctx}admin/adminauth/update">
    <fieldset>
        <fieldset> 
        <div class="pure-control-group">
            <label for="authCode"><fmt:message key='Access.code'/>:<span class="error">*</span></label> 
            <input id="authCode" name="authCode" type="text"  placeholder="" value="${obj.authCode }" readonly="readonly"/>
        </div> 
        <div class="pure-control-group">
            <label for="authName"><fmt:message key='Permission.to.name'/>:</label> 
            <input id="authName" name="authName" type="text"  placeholder="" value="${obj.authName }"/>
        </div> 
		
        <div class="pure-control-group">
	        <label for="parentAuthCode"><fmt:message key='parent.encoding'/></label>
	        <select id="parentAuthCode" name="parentAuthCode" style="text-align: center;"> 
                      <option value="ROOT" ><fmt:message key='root'/></option>
				<c:if test="${authlist !=null and not empty authlist}">
					<c:forEach items="${authlist}" var="objl" varStatus="status">
                      <option value="${objl.key}"  <c:if test="${obj.parentAuthCode == objl.key }">selected="selected"</c:if> >${objl.value }</option>
   	                </c:forEach>
				</c:if>
			</select> 
        </div> 
        <div class="pure-control-group">
	        <label for="status"><fmt:message key='status'/></label>
	        <select id="status" name="status" style="text-align: center;"> 
				<option value="0" <c:if test="${obj.status == 0 }">selected="selected"</c:if> ><fmt:message key='disable'/></option>
				<option value="1" <c:if test="${obj.status == 1 }">selected="selected"</c:if> ><fmt:message key='available'/></option>
				<option value="-1" <c:if test="${obj.status == -1 }">selected="selected"</c:if> ><fmt:message key='Deletes'/></option> 
			</select> 
        </div> 
        <%-- <div class="pure-control-group">
        <!-- 1:menu,2:button,3:data? -->
	        <label for="authType"><fmt:message key='Permission.types'/></label>
	        <select id="authType" name="authType" style="text-align: center;"> 
				<option value="1" <c:if test="${obj.authType == 1 }">selected="selected"</c:if> ><fmt:message key='menu'/></option>
				<option value="2" <c:if test="${obj.authType == 2 }">selected="selected"</c:if> ><fmt:message key='button'/></option>
				<option value="3" <c:if test="${obj.authType == 3 }">selected="selected"</c:if> ><fmt:message key='data'/></option>
			</select>
        </div> --%> 
        <div class="pure-control-group">
            <label for="authSeq"><fmt:message key='Access.number'/>:</label> 
            <input id="authSeq" name="authSeq" type="text"  placeholder="" value="${obj.authSeq }" />
        </div>
        <%-- <div class="pure-control-group">
            <label for="authUrl">URL:</label> 
            <input id="authUrl" name="authUrl" type="text"  placeholder="" value="${obj.authUrl }" />
        </div> --%>
    </fieldset>
</form>

	<!-- 页尾，提示消息 -->
	<jsp:include page="../../commons/_foot_message.jsp"></jsp:include> 
	
	<script>
		jQuery(document).ready(function() {
			var webStatust = $("#webStatus").html();
			if(empty(webStatust)){
				return ;
			}else if(webStatust == 200) {
				parent.listFormPageSearch(1);
			}
		});
	</script> 
</body>
</html>